ValueFolderTemp='/sps/isc/rneveu/EtudeIRM/Nature/ResultsJournal/';
ValueFolderTemp2='/sps/isc/rneveu/EtudeIRM/Nature/ResultsEditor/';
load([ValueFolderTemp 'ResultsThirdLevelDistributionOutliers.mat']);
VecDistribution=VecResults;
load('/sps/isc/rneveu/EtudeIRM/Nature/EtudeNature.mat');
VecEditors1Temp(1,:)=[];
VecValueEditor=VecEditors1Temp;
load('/sps/isc/rneveu/EtudeIRM/Nature/DonneesNature.mat');
VecValueJournal=VecJournalTemp;
ValueCutoff=1.25;
VecFigure=[{'Journal'} {'Year of first article recorded in PubMed'} {'N editors (% included in the analyses)'} {'N editor with only a PhD (%)'} {'Editors'' editorial experience (years, mean (SD))'} {'Editors'' experience in research (years, mean (SD))'} {'Editors'' number of original articles as first or last author (mean (SD))'} {'Editors'' postdoc experience (years, mean (SD))'}];
VecResultsTemp=zeros(3,33);
VecResultsYear=NaN(1,33);
for n1=1:323
    if n1~=11
        ValueTemp=find(VecDistribution(:,1)==n1);
        ValueStartEditor=VecValueEditor{n1,22};
        ValueJournal=VecValueEditor{n1,11};
        n3=1;
        TestTemp=0;
        while n3<=size(VecValueJournal,1)&&TestTemp==0
            if strcmpi(ValueJournal,VecValueJournal{n3,1})==1
                TestTemp=1;
            else
                n3=n3+1;
            end
        end
        VecResultsTemp(1,n3)=VecResultsTemp(1,n3)+1;
        VecResultsYear(1,n3)=VecValueEditor{n1,12};
        ValueEditorTemp=VecValueEditor{n1,13};
        if strcmp(ValueEditorTemp,'Y')==1
            VecResultsTemp(2,n3)=VecResultsTemp(2,n3)+1;
        end
        if size(ValueTemp,1)==1
            if VecDistribution(ValueTemp,2)<=ValueCutoff
                VecResultsTemp(3,n3)=VecResultsTemp(3,n3)+1;
            end
        end
    end
end
VecResultsTemp6=VecResultsTemp;
VecResultsJournal=[];
VecResultsStartNature=[];
for n1=1:33
    load([ValueFolderTemp 'FileAnalysisCharacteristicsEditorsJournal' num2str(n1) 'SD.mat']);
    VecResultsJournalEditorSD=VecResultsJournalEditor;
    load([ValueFolderTemp 'FileAnalysisCharacteristicsEditorsJournal' num2str(n1) '.mat']);
    load([ValueFolderTemp 'StartJournal' num2str(n1) '.mat']);
    VecResultsJournal=[VecResultsJournal;VecResultsJournalEditor(1,1:38) StartDate];
    VecResultsTemp=[{VecValueJournal{n1,1}} {[num2str(StartDate(1,1)) ' (' num2str(VecResultsYear(1,n1)) ')']} {[num2str(VecResultsTemp6(1,n1)) ' (' num2str(VecResultsTemp6(3,n1)/VecResultsTemp6(1,n1)*100,3) ')']} {[num2str(VecResultsTemp6(2,n1)) ' (' num2str(VecResultsTemp6(2,n1)/VecResultsTemp6(1,n1)*100,3) ')']} {[num2str(VecResultsJournalEditor(1,16),3) ' (' num2str(VecResultsJournalEditorSD(1,16),3) ')']} {[num2str(VecResultsJournalEditor(1,27),3) ' (' num2str(VecResultsJournalEditorSD(1,27),3) ')']} {[num2str(VecResultsJournalEditor(1,19),3) ' (' num2str(VecResultsJournalEditorSD(1,19),3) ')']} {[num2str(VecResultsJournalEditor(1,11),3) ' (' num2str(VecResultsJournalEditorSD(1,11),3) ')']}];
    VecFigure=[VecFigure;VecResultsTemp];
    VecResultsStartNature=[VecResultsStartNature;StartDate(1,1) VecResultsYear(1,n1)];
end
VecResultsStartScience=[1880;2015;2016;2016;1999;2009];
for n1=34:38
    load([ValueFolderTemp 'StartJournal' num2str(n1) '.mat']);
    VecResultsStartNature=[VecResultsStartNature;StartDate(1,1) VecResultsStartScience(n1-33,1)];
end
% save([ValueFolderTemp 'AnalyseNatureTable.mat'],'VecFigure');
save([ValueFolderTemp 'AnalyseNatureTableStartNatureScience.mat'],'VecResultsStartNature');
            